<!DOCTYPE html>
<html lang="zh-cmn-Hans">
		<meta name="keywords" content="营圈网">
		<meta name="description" content="营圈网，一起来赢！">
		<title>结算中心|营圈网，一起来赢！</title>
		<#include "/common/head.html">
	</head>

	<body>
		<!--头部-->
		<#include "/common/top-nav.html">
		<#import "/common/header.html" as header>
		<@header.header page="cart"/>

		<!--头部-->
		<div class="home-section">
			<!-- 二级 -->
			<!--引入发票提示样式-->
			<link rel="stylesheet" type="text/css" href="css/buynow.css">
				<div class="conrm-section w">
					<div class="thisPon">
						<div class="ponState clearfix">
							<span class="fl one">1</span> <span class="fl two">2</span> <span class="fl three active">3</span>
						</div>
						<div class="ponTitle clearfix">
						<i class="fl l">我的购物车</i> <i class="fl c active">订单结算</i> <i class="fl r active">订单支付</i>
						</div>
					</div>
					<!--填写核对订单信息-->
					<div class="orInfio">
						<h2 class="t">填写并核对订单信息</h2>
						<ul class="detailed">
							<li class="receipt" id="addrList">
								<div class="clearfix receiptCh">
									<h6 class="fl">收货人信息</h6>
									<a href="javascript:;" class="fr sd" name="addAddr">新增加收货地址</a>
								</div>
								<#assign defaultAddr = "">
								<#assign defaultAddress = "">
								<#assign defaultAddrContactor = "">
								<#assign defaultAddrMobile = "">
								<#if addrs?? && addrs?size gt 0>
								<#list addrs as item>
								<#if item.defaultAddr == 1>
								<#assign defaultAddrContactor = item.contactor>
								<#assign defaultAddrMobile = item.phone>
								</#if>
								<div class="receive" id="receive_${(item.id)!""}">
									<div class="consignee-item clearfix ">
										<#assign defaultAddr = ((item.provinceName)!"") +" "+ ((item.cityName)!"") +" "+ ((item.address)!"")>
										<#assign defaultAddress = "寄送至： " + defaultAddr + "&ensp;收货人："+((item.contactor)!"") +"&ensp;"+((item.phone)!"")>
										<div class="fl myAddress place <#if ((item.defaultAddr)!0) == 1>active</#if>"  addrId = ${(item.id)!""}  onclick="setAddrActivy(this)" addrRecive="${(defaultAddr)!""}" reciver="${(item.contactor)!""}" phone="${(item.phone)!""}">
											${(item.contactor)!""} <em></em>
										</div>
										<span class="fl ed">${(item.provinceName)!""}、${(item.cityName)!""}、${(item.address)!""}</span>
										<span class="fl">${(item.phone)!""}</span>
										<a href="javascript:;"  class="fr" addrId="${(item.id)!""}" name="editAddr">编辑</a>
									</div>
								</div>
								</#list>
								<#else>
									 <a href="javascript:;" class="fr sd" name="addAddr">暂无收货地址，马上添加</a>
								</#if>
							</li>
							<li class="method">
								<h5>支付方式</h5>
								<div class="payment clearfix">
									<#if payMethods??>
									<#list payMethods as item>
									<span class="fl balance_money <#if item.id == 3>active</#if>" value="${(item.id)!0}">${(item.name)!""}<em></em></span>
									</#list>
									</#if>
								</div>
							</li>
							<li class="method">
								<h5>配送方式</h5>
								<div class="payment clearfix">
									<span class="fl shipping_method active" value="1">物流配送<em></em></span>
									<span class="fl shipping_method" value="2">上门自提<em></em></span>
								</div>
							</li>
							<li class="method">
								<h5>配送时间</h5>
								<div class="payment clearfix">
									<span class="fl shipping_time active" >不限时间<em></em></span>
									<span class="fl shipping_time" >工作日<em></em></span>
									<span class="fl shipping_time" >双休、节假日<em></em></span>
									<span class="fl shipping_time" >电话联系<em></em></span>
								</div>
							</li>
							<li class="confirm">
								<div class="clearfix titPart">
									<h4 class="fl">确认订单信息</h4>
									<a href="/cart/list.html" class="fr">返回修改购物车</a>
								</div>
								<div class="payment clearfix">
									<div class="subject clearfix">
										<span class="fl ition">商品信息</span> 
										<span class="fl price">&nbsp;</span> 
										<span class="fl atte">单价</span> 
										<span class="fl number">数量</span> 
										<span class="fl dint"></span> 
										<span class="fl sual"></span> 
										<span class="fl sual">小计</span>
									</div>
									<#assign totalMoney = 0>
									<#if carts?? && carts?size gt 0>
									<#list carts as item>
									<div class="paymentCon clearfix">
										<div class="con-parent clearfix fl">
											<a href="/ware/${(item.wareId)!0}.html" class="fl position-parent">
												<img src="${(item.mainImage)!""}" alt="${(item.wareName)!""}-营圈网">
											</a>
											<div class="fl ition">
												<a href="/ware/${(item.wareId)!0}.html" >${(item.wareName)!""}</a>
											</div>
										</div>
										<div class="fl price">&nbsp;</div>
										<div class="fl atte">￥${((item.pricePromotional)!0)?string('0.00')}</div>
										<div class="fl number">${(item.number)!0}</div>
										<div class="fl sual" id="sslh">${(((item.pricePromotional)!0) * ((item.number)!0))?string('0.00')}</div>
										<#assign totalMoney += item.pricePromotional * item.number>
									</div>
									</#list>
									</#if>
									
									<form id="gotoPayForm" action="/order/create.html" method="POST">
										<input name="contacts" id="contacts" value="${(defaultAddrContactor)!""}" type="hidden">
										<input name="phone" id="mobile" value="${(defaultAddrMobile)!""}" type="hidden">
										<input name="shippingAddress" id="shippingAddress" value="${defaultAddr}" type="hidden">
										<!-- 默认微信支付 -->
										<input name="payMethodId" id="payMethodId" value="3" type="hidden">
										<input name="payMethodName" id="payMethodName" value="${(addr.contactor)!""}" type="hidden">
										<input name="shippingTime" id="shippingTime" value="不限时间" type="hidden">
										<input name="shippingMethod" id="shippingMethod" value="物流配送" type="hidden">
									<!--订单备注-->
									<div class="rderNote clearfix">
										<span class="fl">订单备注：</span> <input type="text" class="fl" id="remark" name="remark" placeholder="请填写订单相关的备注信息">
									</div>
									</form>
								</div>
							</li>
						</ul>
						<div class="total">
							<p class="one">
								<span>共<span style="color: red;font-size: large">${(carts?size)!0}</span>件商品</span>&emsp;
								<span>应付总额：</span>
								<span style="color: red;font-size: large">￥${totalMoney?string('0.00')}</span>
							</p>
							<p class="two" id="reciveAddr">${defaultAddress}</p>
						</div>

						<div class="randbtn clearfix">
							<input type="button" value="去支付" class="fr" id="payBtn">
						</div>
					</div>
				</div>
			<!--地址编辑and新建-->
		</div>
	
		<!--尾部-->
		<#include "/common/footer.html">
		<#include "/mine/address-add.html">
		<script type="text/javascript" src="http://static.yqw.com/js/biz/settlement.js"></script>
		
		<#if msg?? && msg?length gt 0>
		<script>
		layer.alert('错误提示', {
			  icon: 5,
			  title:'错误提示',
			  skin: 'layer-ext-moon',
			  content: '${msg}'
			});
		</script>
		</#if>
	</body>

</html>